//
//  NSObject+ValueOfJson.m
//  Cinema
//
//  Created by hjj on 13-6-8.
//  Copyright (c) 2013年 hjj. All rights reserved.
//

#import "NSObject+ValueOfDictionary.h"

@implementation NSObject (ValueOfJson)

- (void)setValueWithDictionary:(NSDictionary*)dic
{
    for (NSString *key in dic.allKeys) {
        id value = [dic objectForKey:key];
        if(value != [NSNull null])
        {@try {
                [self setValue:value forKeyPath:key];
            }@catch (NSException *exception) {}
        }
    }
}

@end
